<div class="form">

	<?php
	$form = $this->beginWidget('CActiveForm',
		array(
		'id'=>'city-form',
		'enableAjaxValidation'=>false,
		));
	?>

	<p class="note">
		Isian bertanda <span class="required">*</span> harus diisi.
	</p>

	<?php
	echo $form->errorSummary($model);
	$htmlOptions = array('size'=>60, 'maxlength'=>255, 'class'=>'fill');
	?>

	<div class="row">
		<?php
		echo $form->labelEx($model, 'provinceId');
		$data = CHtml::listData(Province::model()->findAll(), '_id', 'name');
		echo $form->dropDownList($model, 'provinceId', $data);
		echo $form->error($model, 'provinceId');
		?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model, 'name'); ?>
		<table>
			<tr>
				<td>
					<?php
					$data = array(
						City::TYPE_REGENCY=>City::TYPE_REGENCY,
						City::TYPE_MUNICIPALITY=>City::TYPE_MUNICIPALITY,
					);
					echo $form->dropDownList($model, 'type', $data);
					?>
				</td>
				<td class="fill">
					<?php
					echo $form->textField($model, 'name', $htmlOptions);
					?>
				</td>
			</tr>
		</table>

		<?php
		echo $form->error($model, 'name');
		?>
	</div>

	<div class="row">
		<?php
		echo $form->labelEx($model, 'chiefName');
		echo $form->textField($model, 'chiefName', $htmlOptions);
		echo $form->error($model, 'chiefName');
		?>
	</div>

	<div class="row">
		<?php
		$htmlOptions = array('rows'=>6, 'cols'=>50);
		echo $form->labelEx($model, 'chiefAddress');
		echo $form->textArea($model, 'chiefAddress', $htmlOptions);
		echo $form->error($model, 'chiefAddress');
		?>
	</div>

	<div class="row">
		<?php
		$htmlOptions = array('size'=>60, 'maxlength'=>255, 'class'=>'fill');
		echo $form->labelEx($model, 'chiefPhones');
		echo $form->textField($model, 'chiefPhones', $htmlOptions);
		echo $form->error($model, 'chiefPhones');
		?>
	</div>

	<div class="row">
		<?php
		echo $form->labelEx($model, 'emails');
		echo $form->textField($model, 'emails', $htmlOptions);
		echo $form->error($model, 'emails');
		?>
	</div>

	<div class="row buttons">
		<?php
		$label = $model->isNewRecord ? 'Create' : 'Save';
		echo CHtml::submitButton($label);
		?>
	</div>

	<?php $this->endWidget(); ?>

</div><!-- form -->